﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Text;

/// <summary>
/// Summary description for SliderBuilder
/// </summary>
public class SliderBuilder
{
    SliderDA s = new SliderDA();
    public string BuilderSlider() {
        StringBuilder buider = new StringBuilder();
        int vitri = 0;
        foreach (Slider objslider in s.getData())
        {
            vitri++;
            buider.Append("<a href=\""+objslider.Link+"\" target=\"_blank\" >");
            buider.Append("<img id=\"slide-img-" + vitri + "\" src=\"" + objslider.Url.Replace("~/", "") + "\" class=\"slide\" alt=\"\" title=\"" + objslider.Noidung + "\" runat=\"server\"/>");
            buider.Append("</a>");
        }
        return buider.ToString();
    }
}